﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002FE RID: 766
	public class TIsolationClause : TParseTreeNode
	{
		// Token: 0x17000626 RID: 1574
		// (get) Token: 0x06001B1C RID: 6940 RVA: 0x0032EDDD File Offset: 0x0032CFDD
		// (set) Token: 0x06001B1D RID: 6941 RVA: 0x0032EDE5 File Offset: 0x0032CFE5
		public virtual EIsolationLevel IsolationLevel
		{
			get
			{
				return this.isolationLevel;
			}
			set
			{
				this.isolationLevel = value;
			}
		}

		// Token: 0x06001B1E RID: 6942 RVA: 0x0032EDF0 File Offset: 0x0032CFF0
		public override void init(object arg1)
		{
			if (!(arg1 is TConstant))
			{
				this.isolationLevel = (EIsolationLevel)arg1;
				return;
			}
			if (((TConstant)arg1).ToString().Equals("0", StringComparison.CurrentCultureIgnoreCase))
			{
				this.isolationLevel = EIsolationLevel.readUncommitted;
				return;
			}
			if (((TConstant)arg1).ToString().Equals("1", StringComparison.CurrentCultureIgnoreCase))
			{
				this.isolationLevel = EIsolationLevel.readCommitted;
				return;
			}
			if (((TConstant)arg1).ToString().Equals("2", StringComparison.CurrentCultureIgnoreCase))
			{
				this.isolationLevel = EIsolationLevel.repeatableRead;
				return;
			}
			if (((TConstant)arg1).ToString().Equals("3", StringComparison.CurrentCultureIgnoreCase))
			{
				this.isolationLevel = EIsolationLevel.serializable;
				return;
			}
			this.isolationLevel = EIsolationLevel.unknown;
		}

		// Token: 0x06001B1F RID: 6943 RVA: 0x0032EE9C File Offset: 0x0032D09C
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06001B20 RID: 6944 RVA: 0x0032EEAC File Offset: 0x0032D0AC
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x040019DE RID: 6622
		private EIsolationLevel isolationLevel;
	}
}
